import lodash from 'lodash';
import { TRequest } from './request';

import { httpConfig } from '../../setting';

function createHTTP() {
  const newOpts = lodash.assign({ baseUrl: httpConfig.baseUrl, token: httpConfig.token });
  return new TRequest(newOpts);
}

export const defHttp = createHTTP();
